package top.ochiamalu.aioj.enums;

import lombok.Getter;

/**
 * 题目生成enum
 *
 * @author ochiamalu
 * @date 2025/04/18
 */
@Getter
public enum QuestionGenerateEnum {
    CONTENT(0, "题目详情"),
    TAGS(1, "标签"),
    TEST_CASE(2, "测试用例"),
    FULL(3, "完整生成");

    private final Integer type;
    private final String description;

    QuestionGenerateEnum(final Integer type, final String description) {
        this.type = type;
        this.description = description;
    }

    public static QuestionGenerateEnum getEnumByType(Integer type) {
        for (QuestionGenerateEnum questionGenerateEnum : QuestionGenerateEnum.values()) {
            if (questionGenerateEnum.getType().equals(type)) {
                return questionGenerateEnum;
            }
        }
        return null;
    }
}
